package com.mtao.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.groups.Default;
import lombok.*;

import java.time.LocalDateTime;

@Data
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class Product {
    private Integer id;
    @NotEmpty
    private String name;
    @NotEmpty
    private String img;
    @NotEmpty
    private String type;
    private String username;
    private String description;
    @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss")
    private LocalDateTime updateTime;


    public interface Add extends Default {

    }
    public interface Update extends Default{

    }

}
